﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;

namespace UscSunShine.Mvc
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            //AutoMapper配置
            UscSunShine.Mvc.AutoMapperConfig.Configure();

            //System.Data.Entity.Database.SetInitializer(new System.Data.Entity.MigrateDatabaseToLatestVersion<UscSunShine.Models.ApplicationDbContext, UscSunShine.Models.Migrations.Configuration>());
            //System.Data.Entity.Database.SetInitializer(new UscSunShine.Models.ApplicationDbInitializer());
            //new UscSunShine.Models.ApplicationDbContext().Database.Initialize(true);
        }
    }
}
